package teachnotes.guides.engine;

import teachnotes.guides.compute.Compute;
import teachnotes.guides.compute.Task;

import java.rmi.RemoteException;

/**
 * 服务端接口实现-计算引擎实现  (实现远程接口)
 * @author xiaoming
 * @date 2020-06-22 6:45
 */
public class ComputeEngine implements Compute {

    public ComputeEngine() {
        super();
    }

    // 远程方法的实现
    @Override
    public <T> T executeTask(Task<T> t) throws RemoteException {
        return t.execute();
    }

}
